package com.krtech.wecard.module.ai.controller;


import cn.hutool.core.util.StrUtil;
import com.krtech.wecard.framework.exception.BusinessException;
import com.krtech.wecard.framework.utils.LoginUtil;
import com.krtech.wecard.module.ai.entity.mergeVideoByPicVo;
import com.krtech.wecard.module.ai.service.MergeVideoFaceService;
import com.krtech.wecard.module.pub.dto.CardInfoVo;
import com.krtech.wecard.module.sys.entity.SysUser;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Date;

@RestController
@RequestMapping("/mergeVideoFace")
@Api(value = "视频生产",tags = "视频生产")
public class MergeVideoFaceController {

    @Autowired
    private MergeVideoFaceService mergeVideoFaceService;


    @PostMapping("/mergeVideoByPic")
    @ApiOperation(value = "人脸合成视频")
    public String mergeVideoByPic(@RequestBody mergeVideoByPicVo mergeVideoByPicVo){
        if (StrUtil.isEmpty(mergeVideoByPicVo.getVideoURL()) || StrUtil.isEmpty(mergeVideoByPicVo.getReferenceURL())){
            throw new BusinessException("必填参数不能不为空");
        }

        return mergeVideoFaceService.mergeVideoByPic(mergeVideoByPicVo);
    }

}
